//----------------------------------*-C++-*----------------------------------//
/*!
 * \file   Materials.i.hh
 * \author Jeremy Roberts
 * \date   Jul 17, 2011
 * \brief  Materials inline member definitions.
 * \note   Copyright (C) 2011 Jeremy Roberts. 
 */
//---------------------------------------------------------------------------//
// $Rev::                                               $:Rev of last commit
// $Author:: j.alyn.roberts@gmail.com                   $:Author of last commit
// $Date::                                              $:Date of last commit
//---------------------------------------------------------------------------//


#ifndef MATERIALS_I_HH_
#define MATERIALS_I_HH_

namespace slabtran
{

// Return const cross sections for a group and material id.
inline const Materials::XS& Materials::get(int xs_id) const
{
  Require (xs_id >= 0 && xs_id < d_xs.size());
  Ensure (d_xs[xs_id]);
  return *(d_xs[xs_id]);
}

// Return mutable cross sections for a material.
inline Materials::XS& Materials::get(int xs_id)
{
  Require (xs_id >= 0 && xs_id < d_xs.size());
  Ensure (d_xs[xs_id]);
  return *(d_xs[xs_id]);
}

// Return SP to cross sections for a material.
inline Materials::SP_XS& Materials::get_p(int xs_id)
{
  Require (xs_id >= 0 && xs_id < d_xs.size());
  return d_xs[xs_id];
}

} // end namespace slabtran

#endif /* MATERIALS_I_HH_ */

//---------------------------------------------------------------------------//
//              end of Materials.i.hh
//---------------------------------------------------------------------------//
